package net.muchine.web.front.controller.sample;

import net.muchine.core.sample.HelloSpring;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
public class AnnotationHelloController {
	@Autowired HelloSpring hello;
	
	@RequestMapping("/hello")
	public String hello(@RequestParam String name, ModelMap map) {
		map.put("message", hello.sayHello(name));
		return "/hello";
	}
}
